<template>
  <div class="main">
    <MyHeader bgccolor="tomato" title='标题' color='skyblue'></MyHeader>
    <MyGoods v-for="(item,index) in list" :key="index" :obj="item"></MyGoods>
    <MyFooter :arr="list"></MyFooter>
  </div>
</template>

<script>
import MyFooter from "@/components/MyFooter";
import MyGoods from "@/components/MyGoods";
import MyHeader from "@/components/MyHeader";
import {getList} from './API/cart.js'
export default {
  components: {
    MyFooter,
    MyGoods,
    MyHeader,
  },
  data(){
    return{
      list:[]
    }
  },
  created(){
    getList().then(res=>{
      // console.log(27,res)
      this.list=res.data.list
      console.log(this.list)
      })
  },
};
</script>

<style scoped>
.main{
  padding: 45px 0 50px;
}
</style>
